LaTeX mathematics and tables to HTML3 translator

Introduction

Currently there are no converters which would produce HTML3 conformant mathematics or tables from LaTeX source code. A program has been developed for this specific purpose.

A paper presenting the technical implementation is available both in HTML and in Postscript.

Availability

The program itself can be converted to almost any UNIX platform which has flex, bison and (g)make available. Just open the package with command gtar -zxvf math2html-1.3.tar.gz and say gmake. (You should do a few updates in main.cc before executing gmake. See README for details.) An extension of latex2html, namely l2h (l2h-1.2.tar.gz) is also available. This is the version 1.2.

Usage

The program can be used either with the command line interface or with embedded use in latex2html.

Command line use

The commandline version is activated by typing
math2html [ -d ] [ -c configfile ] [ -i ] sourcefile
and the program will produce the result into standard output. The switches are
-d
Prints the rules the parser uses as it proceeds through the sourcecode.
-c configfile
Reads an additional configuration file. The format of the configuration file is following:

\command   HTML3_counterpart
Two strings in the HTML3 counterpart have a special meaning:
  1. <noparam> - ignores the first argument
  2. %s - represents the first argument
Example of the configuration file might look as follows:

\mathrm    <t>%s</t>
\label     <noparam>
\alpha     &alpha;
-i
Produces ISO 12083 conforming mathematics. (Under work)

Embedded use in l2h

The enhanced version of latex2html introduces two new switches
-thumbnails
l2h will create small images of all pictures included in the LaTeX document with \epsfig of \includegraphics commands. These small images will then link to the original eps image.
-html3
All mathematical and table environments are passed to math2html which tries to produce the HTML3 counterpart. If this does not succeed, l2h will create an image as usually.

Copyright

(C) COPYRIGHT CERN 1995

The copyright and all other rights relating to this computer software, in whatever form, including but not limited to the soure code, the object code and user documentation, are vested in CERN. CERN, on a royalty-free and non-exclusive basis, hereby grants permission to user, copy, change, modify, translate, display, distribute and make available this computer sofyware, subject to the following conditions:

(1) this compiuter softyware is provided on an as-is basis and CERN provides no express or implied warranties of any kind, including but not limited to htose ofmerchantability, fitness for a particular puporse and non-infringement of the proprietary rights, such as copyrights, patents and trade secrets, of third parties, CERN accepts no liability whatsoever for or in connection with the user of this computer software;

(2) all copies made of this computer software or of parts thereof shall include this copyright statement in full;

(3) however, if this computer software or parts thereof are made available in any other form than their original form, or are included in any other ocmputer software, the following short acknowledgement only must be mentioned in the copyright statement and in the user documentation (or, in the absence thereof, in any other appropriate place) concerning the computer software thus made available or created;

"This product includes computer software created and made available by CERN. This acknowledgement shall be mentioned in full in any product which includes the CERN computer software included herein or parts thereof."

Examples

You can get an idea what the translator can do by taking a look at the HTML3 documents of CERNLIB by using the Arena browser.

Author

The author is about to graduate from the Helsinki University of Technology and he can be reached at the following address
Janne Saarela
Lauttasaarentie 43 A 13
00200 Helsinki
Finland
tel.int. +358-0-682 0287

Last update July 31 1995 janne.saarela@cern.ch